home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 4 / The Arsenal Files 4 (Arsenal Computer).ISO / casm / au116-as.exe / AU.HPP < prev    next >
C/C++ Source or Header  |  1994-12-19  |  17KB  |  711 lines

  1. /*********************************************************************/
  2. /* Standard Include Files */
  3.  
  4. #include <dos.h>
  5. #include <dir.h>
  6. #include <stdlib.h>
  7. #include <stdio.h>
  8. #include <string.h>
  9. #include <alloc.h>
  10. #include <bios.h>
  11. #include <io.h>
  12. #include <sys\stat.h>
  13. #include <conio.h>
  14. #include <ctype.h>
  15. #include <fcntl.h>
  16. #include <stdarg.h>
  17. #include <new.h>
  18. #include <process.h>
  19.  
  20. /**********************************************************************/
  21. extern char *methods[];
  22. extern char *versions[];
  23. extern char *legal_values[];
  24. /**********************************************************************/
  25. #define VERSION "@?2AU@?C v1.16.10 (Beta) * Universal Archive Utilities * " __DATE__ " * (Public Domain)@?H\n"
  26.  
  27. /*********************************************************************/
  28. /* Archive types */
  29. /*****************/
  30.  
  31. enum ARC_TYPE
  32. {
  33.    NONARC,         // 0
  34.    ARC,          // 1
  35.    ARC7,         // 2
  36.    ARJ,          // 3
  37.    DWC,          // 4
  38.    HA,             // 5
  39.    HAP,          // 6
  40.    HPK,          // 7
  41.    HYP,          // 8
  42.    LBR,          // 9
  43.    LZE,          // 10
  44.    LZH,          // 11
  45.    LZS,          // 12
  46.    MD,             // 13
  47.    PAK,          // 14
  48.    RAR,          // 15
  49.    SQZ,          // 16
  50.    UC2,          // 17
  51.    ZIP,          // 18
  52.    ZOO,          // 19
  53.  
  54.    GIF87,         // 20
  55.    GIF89,         // 21
  56.  
  57.    MAX_TYPES
  58. };
  59.  
  60. /*********************************************************************/
  61. /* Support defines */
  62. /*******************/
  63. /* define as FALSE the ones you do not want to support, recompile */
  64.  
  65. #define SUPPORT_ARC TRUE
  66. #define SUPPORT_ARJ TRUE
  67. #define SUPPORT_DWC TRUE
  68. #define SUPPORT_HA    TRUE
  69. #define SUPPORT_HAP TRUE
  70. #define SUPPORT_HPK TRUE
  71. #define SUPPORT_HYP TRUE
  72. #define SUPPORT_LBR TRUE
  73. #define SUPPORT_LZE TRUE
  74. #define SUPPORT_LZH TRUE
  75. #define SUPPORT_LZS TRUE
  76. #define SUPPORT_MD    TRUE
  77. #define SUPPORT_PAK TRUE
  78. #define SUPPORT_RAR TRUE
  79. #define SUPPORT_SQZ TRUE
  80. #define SUPPORT_UC2 TRUE
  81. #define SUPPORT_ZIP TRUE
  82. #define SUPPORT_ZOO TRUE
  83.  
  84. #define SUPPORT_GIF TRUE
  85.  
  86. #define SUPPORT_SELF TRUE
  87.  
  88. /*********************************************************************/
  89. /* Defines used in most of the utilities */
  90. /*****************************************/
  91.  
  92. enum BOOLEAN {FALSE = 0, TRUE = 1};
  93. enum STATUS {SUCCESS = 0, FAILURE = -1};
  94.  
  95. typedef unsigned char BYTE;
  96.  
  97. #define FLENGTH    80       /* Limit on dir+file length */
  98. #define CLENGTH    127       /* Limit of a command to execute */
  99. #define FILE_PREF  9       /* File prefix size */
  100. #define FILE_EXT   4       /* File extension size */
  101. #define FILE_SIZE  13       /* File Size */
  102. #define DESC_SIZE  150       /* Max len of description */
  103. #define ENV_SIZE   80       /* Max environment variable size */
  104.  
  105. enum CFG_VAL
  106. {
  107.     CFG_NO_VAL =  0,
  108.     OFF        =  0x0001,
  109.     ON           =  0x0002,
  110.     ALWAYS       =  0x0004,
  111.     LAST       =  0x0008,
  112.     FIRST       =  0x0010,
  113.     BENCH       =  0x0020,
  114.     ONLY       =  0x0040,
  115.     SKIP       =  0x0080
  116. };
  117.  
  118. #define OPUS 1
  119. #define RBBS 2
  120. #define GT     3
  121.  
  122. #define MAX_FLISTS 10
  123.  
  124. #define READ       0
  125. #define WRITE       1
  126. #define READ_WRITE 2
  127. #define APPEND       3
  128.  
  129. #define TEMP_DIR "AU94"
  130. #define NOTHING  "Nothing to Do!\n"
  131. #define PARAM_HEADING "@?7Command line parameters:\n" "========================\n@?H"
  132.  
  133. #define EVER ;;
  134.  
  135. #define MAX_ERRORS     10      /* Maximum number of diff errors */
  136.  
  137. #define CANT_EXECUTE 99
  138.  
  139. /*********************************************************************/
  140. #define IMAGE_MEMORY 90000L  /* Amount of memory core takes up */
  141.  
  142. /*********************************************************************/
  143. /* Structures used in most of the utilities */
  144. /********************************************/
  145.  
  146. //typedef struct AU AU;
  147.  
  148. class AU;
  149.  
  150. class LIST
  151. {
  152.     public:
  153.  
  154.         char *data;
  155.         LIST *next;
  156.  
  157.         LIST()
  158.         {
  159.             data = NULL;
  160.             next = NULL;
  161.         }
  162. };
  163.  
  164. class LISTPTR
  165. {
  166.     public:
  167.  
  168.         LIST *head;
  169.         LIST *tail;
  170.  
  171.         void reset()
  172.         {
  173.             head = tail = NULL;
  174.         }
  175.  
  176.         LISTPTR()
  177.         {
  178.             reset();
  179.         }
  180.  
  181.         ~LISTPTR()
  182.         {
  183.             destroy();
  184.         }
  185.  
  186.         void add(char *);
  187.         void destroy();
  188. };
  189.  
  190. typedef struct
  191. {
  192.     int year;
  193.     unsigned char month;
  194.     unsigned char day;
  195. } DATE;
  196.  
  197. typedef struct
  198. {
  199.     char name[120];           /* Long for names on other systems */
  200.     char path[120];
  201.     long packed_size;
  202.     long unpacked_size;
  203.     long crc;
  204.     long attrib;              /* file attributes */
  205.     unsigned char method;      /* Archive Method for individual file, ie Distill, Implode, etc */
  206.     DATE date;
  207.     unsigned char hour;
  208.     unsigned char min;
  209.     unsigned char sec;
  210.     BYTE encrypted;           /* Password encrypted TRUE/FALSE */
  211. } ARC_RECORD;
  212.  
  213. class HANDLE
  214. {
  215.     private:
  216.  
  217.         int   fh;                     /* File Handle */
  218.         int   readBufferSize;         /* Size of malloced buffer */
  219.         BYTE *buffer;                 /* Buffer */
  220.         int   bufferPointer;         /* Current position */
  221.         int   bufferEnd;             /* End position */
  222.         long  bufferFilePos;         /* file Byte # for start of buffer */
  223.  
  224.     public:
  225.  
  226.         void reset()
  227.         {
  228.             bufferPointer = 0;
  229.             bufferEnd = 0;
  230.         }
  231.  
  232.         HANDLE (int size = 512)
  233.         {
  234.             readBufferSize = size;
  235.             buffer = new BYTE[size];
  236.             reset();
  237.             fh = -1;
  238.         }
  239.  
  240. //          HANDLE ()
  241. //          {
  242. //              HANDLE(512);
  243. //          }
  244.  
  245.         ~HANDLE()
  246.         {
  247.             close();
  248.             delete [] buffer;
  249.         }
  250.  
  251.         BOOLEAN is_open()
  252.         {
  253.             if (fh != -1)
  254.                 return TRUE;
  255.             else
  256.                 return FALSE;
  257.         }
  258.  
  259.         void get_time(struct ftime *ftime_hold)
  260.         {
  261.             getftime(fh, ftime_hold);
  262.         }
  263.  
  264.         void set_time(struct ftime *ftime_hold)
  265.         {
  266.             setftime(fh, ftime_hold);
  267.         }
  268.  
  269.         int read_raw(void *buffer, unsigned int size)
  270.         {
  271.             reset();
  272.             return ::read(fh, buffer, size);
  273.         }
  274.  
  275.         int write_raw(void *buffer, unsigned int size)
  276.         {
  277.             reset();
  278.             return ::write(fh, buffer, size);
  279.         }
  280.  
  281.         int seek_raw(long pos, int from)
  282.         {
  283.             reset();
  284.             return lseek(fh, pos, from);
  285.         }
  286.  
  287.         int create(char *file_name, int attrib)
  288.         {
  289.             return fh = ::creat(file_name, attrib);
  290.         }
  291.  
  292.         long file_length()
  293.         {
  294.             return ::filelength(fh);
  295.         }
  296.  
  297.         STATUS open(AU *, char *, int access = O_RDONLY | O_BINARY);
  298.         void   close();
  299.         long   seek(long, int);
  300.         int    read_char();
  301.         int    read_raw_line(char *);
  302.         int    read_line(AU *, char *);
  303.         int    read_word(char *);            /* Text word */
  304.         long   read_long();
  305.         int    read_int();
  306.         int    read_string(char *);         /* Read null terminated string */
  307.         int    read(char *, int);
  308.  
  309.         void   write_text(char *);
  310. };
  311.  
  312. class CFG_HANDLE : public HANDLE
  313. {
  314.     private:
  315.  
  316.         HANDLE handle;
  317.         char file_name[FLENGTH];
  318.         int line_number;
  319.  
  320.     public:
  321.  
  322.         CFG_HANDLE() : handle(4096)
  323.         {
  324.         }
  325.  
  326.         ~CFG_HANDLE()
  327.         {
  328.         }
  329.  
  330.         STATUS open(AU *, char *);
  331.         void   close();
  332.         int    read_line(AU *, char *);
  333.         void   invalid_option(AU *au, char *);
  334.         void   invalid(AU *, char *);
  335.  
  336. };
  337.  
  338. class ARC_HANDLE : public HANDLE
  339. {
  340.     private:
  341.  
  342.         HANDLE     handle;
  343.         BYTE     isFirst;
  344.         long     pos;
  345.         long     trailer_pos;  /* Internal information needed */
  346.         int      rec_number;
  347.         int      hold_n;       /* DWC/LBR specific variable to hold number of files */
  348.  
  349.         void     set_trailer_pos(AU *au);
  350.         long     find_last_non_zero();
  351.         BOOLEAN  search_arj(char *, int, long, long, char *);
  352.         BOOLEAN  search_ha(int, char *);
  353.         void     fill_date(ARC_RECORD *);
  354.         void     fill_time(ARC_RECORD *);
  355.  
  356.         int      get_record_arc7(ARC_RECORD *record, char *name);
  357.         int      get_record_arj(ARC_RECORD *record, char *name);
  358.         int      get_record_dwc(ARC_RECORD *record, char *name);
  359.         int      get_record_ha(ARC_RECORD *record, char *name);
  360.         int      get_record_hap(ARC_RECORD *record, char *name);
  361.         int      get_record_hpk(ARC_RECORD *record, char *name);
  362.         int      get_record_hyp(ARC_RECORD *record, char *name);
  363.         int      get_record_lbr(ARC_RECORD *record, char *name);
  364.         int      get_record_lzh(ARC_RECORD *record, char *name);
  365.         int      get_record_md(ARC_RECORD *record, char *name);
  366.         int      get_record_pak(ARC_RECORD *record, char *name);
  367.         int      get_record_rar(ARC_RECORD *record, char *name);
  368.         int      get_record_sqz(ARC_RECORD *record, char *name);
  369.         int      get_record_zip(ARC_RECORD *record, char *name);
  370.         int      get_record_zoo(ARC_RECORD *record, char *name);
  371.  
  372.     public:
  373.  
  374.         ARC_TYPE type;
  375.         BYTE     is_self;
  376.         int      version;       /* Arc version, determined as it proceed */
  377.  
  378.         ARC_HANDLE () : handle(64)
  379.         {
  380.         }
  381.  
  382.         ~ARC_HANDLE()
  383.         {
  384.         }
  385.  
  386.         STATUS init(AU *, char *file_name);
  387.         void   deinit(AU *);
  388.  
  389.         STATUS get_format(AU *, char *);
  390.         int    get_record(AU *, ARC_RECORD *);
  391.         BYTE   archive_is_optimal(AU *, char *);
  392. };
  393.  
  394. #define MAX_LOGS 5
  395.  
  396. class LOG
  397. {
  398.     private:
  399.  
  400.         char *file_name[MAX_LOGS];
  401.         HANDLE *handle[MAX_LOGS];
  402.  
  403.         int num_handles;
  404.  
  405.         HANDLE *find(char *log_file);
  406.         HANDLE *add(AU *au, char *log_file);
  407.  
  408.     public:
  409.  
  410.         void write(AU *au, char *log_file, char *string);
  411.  
  412.         LOG();
  413.         ~LOG();
  414. };
  415.  
  416.  
  417. #define HEADER_RED     0      /* Redirection */
  418. #define HEADER_AT     1      /* @ file */
  419. #define HEADER_FILE  2      /* File */
  420.  
  421.  
  422. typedef struct
  423. {
  424.     char *name;
  425.     char extension[4];
  426.     BYTE strict_ext;
  427.     BYTE unarc_partials;
  428.     BYTE crc;
  429.     char *unarc;
  430.     char *arc;
  431.     char *del;
  432.     char *view;
  433.     char *test;
  434.     char *header;
  435.     char *unarc_path;
  436.     char *unarc_no_path;
  437.     char *arc_path;
  438.     char *arc_no_path;
  439.     char *yes_queries;
  440.     char *overwrite;
  441.     char header_method;
  442.     int  memoryNeeded;                /* Memory in K needed to run */
  443.     BYTE overwrite_int_check;        /* Use internal overwrite check scheme */
  444.     BYTE break_err;                 /* User aborts errorlevel */
  445.     BYTE whatis_err;
  446.     BYTE whatis_color;
  447. } PACKAGE;
  448.  
  449. class AU
  450. {
  451.     public:
  452.  
  453.     long  memStart;                  // Starting amount of memory left
  454.  
  455.     char   *curVal;
  456.     char    curOpt[30];
  457.  
  458.     int     sub_dirs;                 // Process sub dirs
  459.     BYTE    current_color;             // Current Color
  460.  
  461.     BOOLEAN debug;                     // debug mode
  462.     BOOLEAN dirs_only;                 // Process directories only
  463.     BOOLEAN simulate;                 // Simulation mode
  464.     BOOLEAN show_execute;             // Show executed commands
  465.     BOOLEAN no_extra;                 // No extraneous printing
  466.     BOOLEAN no_disp_dirs;             // If true, directorys are not printed
  467.     BOOLEAN quick_test;              // do quicktest TRUE/FALSE
  468.     BOOLEAN allow_rename;             // Allow rename of the archive
  469.     BOOLEAN colorized;                 // Colorized printouts
  470.  
  471.     CFG_VAL smart;                     // Smart Mode
  472.     CFG_VAL pause;                     // Pause On/Off
  473.     CFG_VAL date_retain;             // first or last date
  474.     CFG_VAL self_extracts;             // Self extractors
  475.     CFG_VAL unarc_paths;             // Unarc into archive paths
  476.     CFG_VAL retest;                  // Retest suspicious archives
  477.     CFG_VAL recurse;                 // Recursive unarcs
  478.     CFG_VAL delete_behind;             // Delete archive after unarcing
  479.     CFG_VAL warn_non_dos;             // Warn if non dos files names inside archive
  480.     CFG_VAL warn_path;                 // Warn if path inside archive
  481.     CFG_VAL warn_hidden;             // Warn if hidden/system inside archive
  482.     CFG_VAL warn_existing;             // Warn if files already exist
  483.     CFG_VAL answer_y;                 // Automated process
  484.     CFG_VAL scan_self;                 // Scan self extracts
  485.  
  486.     char cfg_file[FLENGTH];          // Configuration file to use
  487.     int  cfg_line;                     // line number in cfg
  488.  
  489.     char *def_file_spec;             // Environment variable containing file spec
  490.  
  491.     char cur_directory[FLENGTH];
  492.     char last_dir[FLENGTH];          // When changes, display dir
  493.     char source_directory[FLENGTH];
  494.     char old_source_dir[FLENGTH];
  495.     char dest_directory[FLENGTH];
  496.     char old_dest_dir[FLENGTH];
  497.  
  498.     char *argv0;                     // argv[0], used for the .exe path
  499.  
  500.     char output[FLENGTH];
  501.     char partial[FLENGTH];
  502.     char look_through[FILE_SIZE];
  503.  
  504.     char    will_process[1000][FILE_SIZE];
  505.     LISTPTR dont_touch;
  506.     int     wp_count;
  507.  
  508.     int  number_processed;
  509.     int  number_changed;
  510.  
  511.     LISTPTR process_list;
  512.  
  513.     char flist[MAX_FLISTS][FLENGTH];
  514.     char append_flist[MAX_FLISTS];
  515.     char force_mode;
  516.     char description[DESC_SIZE];
  517.     char desc_file[FILE_SIZE];
  518.     int  flist_pos;
  519.  
  520.     LOG log;
  521.  
  522.     char flist_log[FLENGTH];
  523.     char problem_log[FLENGTH];
  524.     char action_log[FLENGTH];
  525.  
  526.     PACKAGE package[MAX_TYPES];
  527.  
  528.     LISTPTR bad_list[MAX_ERRORS];
  529.     int bad_count[MAX_ERRORS];
  530.  
  531.     char rename_to[FLENGTH];         // What to rename it to if test fails
  532.  
  533.     int  num_processed[20];          // Used by unarc
  534.     char y_file[80];
  535.  
  536.     char  scanner[FLENGTH];
  537.     int   SC_NoVirus_EL;             // No virus errorlevel
  538.     int   SC_Virus_EL;                 // Virus errorlevel
  539.     int   scannerMemNeeded;          // Memory needed for the scanner
  540.  
  541.     char  **env;                     // Points to local environment
  542.     char  env_var[ENV_SIZE];         // Environment variable for result
  543.     char  env_cont[CLENGTH];         // Value to assign it to
  544.  
  545.     void   *info;                     // Latch for local structure
  546.  
  547.     AU(char *[], char *[], long);     // Constructor
  548. };
  549.  
  550. extern AU *glob_au;
  551.  
  552. /*********************************************************************/
  553. /* Function Prototypes */
  554. /***********************/
  555.  
  556. /* Main's */
  557.  
  558. int main_add(AU *au, int, char *[]);
  559. int main_compare(AU *, int, char *[]);
  560. int main_convert(AU *, int, char *[]);
  561. int main_delete(AU *, int, char *[]);
  562. int main_dir(AU *, int, char *[]);
  563. int main_dupes(AU *, int, char *[]);
  564. int main_find(AU *, int, char *[]);
  565. int main_fixcr(AU *, int, char *[]);
  566. int main_header(AU *, int, char *[]);
  567. int main_orphan(AU *, int, char *[]);
  568. int main_patch(AU *, int, char *[]);
  569. int main_redate(AU *, int, char *[]);
  570. int main_scan(AU *, int, char *[]);
  571. int main_size(AU *, int, char *[]);
  572. int main_strip(AU *, int, char *[]);
  573. int main_sweep(AU *, int, char *[]);
  574. int main_test(AU *au, int, char *[]);
  575. int main_unarc(AU *, int, char *[]);
  576. int main_version(AU *, int, char *[]);
  577. int main_view(AU *, int, char *[]);
  578. int main_whatis(AU *, int, char *[]);
  579.  
  580. int unarc(AU *, char *, char *, LISTPTR *, int, BYTE);
  581. int scan_one_file(AU *au, char *);
  582. int test(AU *, char *);
  583. int redate_file(AU *, char *);
  584.  
  585. void ReadGlobalCFGInfo(AU *, char *, char *, void (*)(AU *, CFG_HANDLE *));
  586.  
  587. int control_break(void);
  588. void set_ctrl_brk(void);
  589.  
  590. /* Util.LIB *********************************************/
  591.  
  592. typedef enum
  593. {
  594.     PARSE_SINGLE_OPTION,
  595.     PARSE_PARAM_OPTION,
  596.     PARSE_FILESPEC,
  597.     PARSE_POST_CHECK
  598. } PARSE_TYPE;
  599.  
  600. #define PARSE_PARAMS AU *, char, char *, PARSE_TYPE
  601.  
  602. void generic_parse_comm_line(AU *, int, char *[], BYTE (*)(PARSE_PARAMS));
  603.  
  604. CFG_VAL get_value(AU *, unsigned);
  605.  
  606. int  process_files(AU *, int (*)(AU *, char *)),
  607.      count_process_files(AU *),
  608.      ask_continue(void),
  609.      display_bad_arcs(AU *au),
  610.      is_dos_name(char *),
  611.      rename_strict(AU *, PACKAGE *, char *, char *),
  612.      rename_strict_back(char *, char *),
  613.      clean_paths(AU *, LISTPTR *),
  614.      get_next_file_name(AU *, HANDLE *, char *, int *);
  615.  
  616. unsigned short crc16(AU *, char *);
  617. unsigned long  crc32(AU *, char *);
  618. unsigned long  crc32_string(char *, unsigned int);
  619.  
  620. long days_diff(DATE *, DATE *),
  621.      check_threshold(AU *, int, BYTE);
  622.  
  623. void check_for_key(void),
  624.      press_any_key(AU *au),
  625.      split_string(char *, char *),
  626.      append_backslash(char *),
  627.      fix_flist(AU *, char *, char *),
  628.      add_to_flist(AU *, char *, int),
  629.      add_to_bad_list(AU *, char *, char *, BYTE errorlevel=0, int level=0),
  630.      split_file(char *, char *, char *),
  631.      build_fname(char *, char *, char *),
  632.      fill_list_from_BBS(AU *, char *),
  633.      fix_path(char *),
  634.      get_ns(AU *, char *, ARC_HANDLE *, LISTPTR *, LISTPTR *, LISTPTR *,
  635.             LISTPTR *, LISTPTR *, LISTPTR *),
  636.      substitute_macros(char *, char *, char *, char *, char *, char *),
  637.      date_add(DATE *, DATE *, long),
  638.      get_full_file_name(AU *, char *, char *),
  639.      au_invalid_option(AU *, char *, char),
  640.      au_syntax_message(AU *, char *),
  641.      au_opt_filespec_message(AU *),
  642.      au_filespec_message(AU *),
  643.      au_param_heading(AU *),
  644.      au_standard_opt_header(AU *, char *, char *),
  645.      subst_environ(AU *, char *),
  646.      act_log_printf(AU *au, char *format, ...),
  647.      fdate_to_date(DATE *, struct ffblk *),
  648.      version_print(AU *, int, int, BOOLEAN);
  649.  
  650. char ok_to_process(AU *, char *),
  651.      wildcard_compare(AU *, char *, char *),
  652.      fill_file_array(char *);
  653.  
  654. char *left_pad(char *, int),
  655.      *right_pad(char *, int),
  656.      *ltrim(char *),
  657.      *rtrim(char *),
  658.      *fit_mask(char *,char *),
  659.      *date_to_string(DATE *),
  660.      *hms_to_string(int, int, int),
  661.      *percent_string(long, long),
  662.      *safe_string_copy(char *, char *, int, BYTE);
  663.  
  664. void *au_malloc(AU *, int);
  665. void *au_calloc(AU *, int, int);
  666. char *string_save(AU *, char *);
  667.  
  668. BYTE archive_is_old(int);
  669. BYTE file_is_not_optimal(int);
  670. BYTE file_is_stored(int);
  671. BYTE find_ext(AU *, char *);
  672.  
  673. BOOLEAN dir_exists(AU *, char *);
  674. BOOLEAN is_binary_file_char(int);
  675.  
  676. STATUS    cd(AU *, char *, char *x=NULL, BYTE dispError=TRUE);
  677.  
  678. STATUS    process_at_file(AU *, LISTPTR *, char *);
  679.  
  680. /* Ibmdos.LIB ***********************************************/
  681.  
  682. char   my_getch(),
  683.        my_toupper(char);
  684.  
  685.  
  686. char   *my_itoa(int),
  687.        *my_ltoa(long),
  688.        *keyboard_buffer(char *);
  689.  
  690. HANDLE au_open(AU *, char *, int access = O_RDONLY | O_BINARY);
  691.  
  692. int    my_atoi(char *),
  693.        execute(AU *, char *, char *, char *, int),
  694.        execute_raw(AU *, char *),
  695.        alter_env(AU *, char *, char *[]);
  696.  
  697. BYTE   is_stdout(void);
  698. BYTE   is_next_control_s(void);
  699.  
  700. void   string_replace(char *, char *, char *);
  701.  
  702. void   au_printf(AU *, char *, ...);
  703. void   au_printf_c(AU *, char, char *, ...);
  704. void   au_printf_error(AU *, char *, ...);
  705.  
  706. void   get_file_time(AU *, char *, struct ftime *);
  707. void   set_file_time(AU *, char *, struct ftime *);
  708.  
  709. //long     my_fpos(HANDLE);
  710.  
  711.